package com.atguigu.gulimall.auth.feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.auth.vo.SocialUser;
import com.atguigu.gulimall.auth.vo.UserLoginVo;
import com.atguigu.gulimall.auth.vo.UserRegisterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: fd
 * @Date 2021/8/5 17:54
 * @Description:远程调用会员模块
 */
@FeignClient("gulimall-member")
public interface MemberFeignService {

	@PostMapping(value = "/member/member/register")
	R register(@RequestBody UserRegisterVo vo);

	@PostMapping(value = "/member/member/login")
	R login(@RequestBody UserLoginVo vo);

	@PostMapping(value = "/member/member/oauth2/login")
	R oauthLogin(@RequestBody SocialUser socialUser) throws Exception;

	@PostMapping(value = "/member/member/weixin/login")
	R weixinLogin(@RequestParam("accessTokenInfo") String accessTokenInfo);

}
